#—*—coding:utf-8 -*-
#@Time        :2022/7/18 0:52
#@Author      :dhx
#@File        :click_add__pay_collection.py
# @Software: PyCharm
from time import sleep

from selenium.webdriver.common.by import By
from pages.finance_page import FinancePage

class ClickAddPay(FinancePage):
    url='http://192.168.3.133/crm/index.php?m=finance&a=index&t=paymentorder'
    add_payed_locator = (By.XPATH, '/html/body/div[5]/div[2]/div[1]/div[3]/a')  # 新增付款单
    modf_locator = (By.XPATH, '//*[@id="form1"]/table/tbody/tr/td[10]/a[2]')  # 修改
    def click_pay(self):
        """点击添加付款单"""
        self.driver.find_element(*self.add_payed_locator).click()
        sleep(1)
    def mod_pay(self):
        """点击修改"""
        self.driver.find_element(*self.modf_locator).click()
        sleep(1)

